﻿@using Telerik.Web.Mvc.UI
@using WebSite.Views
@using WebSite.ViewModels.DetailsViewModels
@using WebSite.ViewModels

@model DetailsViewModel

<h2>@Model.Title</h2>

@Model.GetTabsViewModel(Html)

<br />

@{ ButtonsViewModel buttonsViewModel = Html.Buttons(); }
@if (Model.CanEdit)
{
    buttonsViewModel.Add(Model.Model, Model.ControllerName, ButtonType.Edit);
}
@if (Model.CanDelete)
{
    buttonsViewModel.Add(Model.Model, Model.ControllerName, ButtonType.Delete);
}
@if (Model.AdditionalButtons != null)
{
    buttonsViewModel.Add(Model.Model, Model.ControllerName, Model.AdditionalButtons.ToArray());
}
@buttonsViewModel